﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DynaSpace.Entity;
using Microsoft.Xna.Framework;

namespace DynaSpace.Game1
{
	class PlayerEngineGame1 : PlayerEngine
	{
		public PlayerEngineGame1(Playground p)
			: base(p)
		{
		}


		public override void  Update(EntityBase entity, GameTime gameTime)
		{
			base.Update(entity, gameTime);

			Player player = entity as Player;

			// položit bombu
			if (DynaGame.Game.IsKeyPressedOnce(player.Index, DynaSpace.Input.PlayerButton.Action2))
			{
				Playground.Map.Add(new BombEntity(Playground,player.Position, player));
			}
		}
	}
}
